package com.godofgamblers.hotelmanagementsystem.handler;

import com.godofgamblers.hotelmanagementsystem.service.TestService;
import lombok.Data;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

/**
 * @author wzx
 * @date 2019/10/14 - 22:40
 */
@Controller
@Data
@RequestMapping("/test")
public class TestHandler {
    @Resource
    private TestService testService;
    @RequestMapping("/all")
    public ModelAndView showAll(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("index.html");
        modelAndView.addObject("allroom",testService.allType());
        return modelAndView;
    }
    @RequestMapping("/order")
    public String jsp(){
        System.out.println("进入咯");
        return "front_simpleorder.html";
    }

}
